{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Higher dimensions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finite difference generalizes readily to multiple dimensions, by computing the elements of the gradient individually:\n", "\n", "$$\n", "\\frac{\\partial f}{\\partial x_i} ≈ \\frac{f(x + heᵢ) - f(x - heᵢ)} {2h} $$\n", "\n", "Boundary cases are handelled similarly but with the bounded dimension calculated by forward / backward difference.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "\n", "